
package uestc.bitman.edxapp.player;

import android.os.Parcel;
import android.os.Parcelable;


public class VideoDesciptor implements Parcelable {

    private String url, title;

    public VideoDesciptor(String url, String title) {
        this.url = url;
        this.title = title;
    }

    public VideoDesciptor() {

    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public static final Parcelable.Creator<VideoDesciptor> CREATOR = new Creator<VideoDesciptor>() {

        @Override
        public VideoDesciptor createFromParcel(Parcel source) {
            VideoDesciptor vd = new VideoDesciptor();
            vd.setTitle(source.readString());
            vd.setUrl(source.readString());
            return vd;
        }

        @Override
        public VideoDesciptor[] newArray(int size) {
            return new VideoDesciptor[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(title);
        dest.writeString(url);
    }
}
